package com.ruoyi.teach.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teach.mapper.NbChapterDiscussMapper;
import com.ruoyi.teach.domain.NbChapterDiscuss;
import com.ruoyi.teach.service.INbChapterDiscussService;

/**
 * 章节/讨论关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-08
 */
@Service
public class NbChapterDiscussServiceImpl implements INbChapterDiscussService 
{
    @Autowired
    private NbChapterDiscussMapper nbChapterDiscussMapper;

    /**
     * 查询章节/讨论关联
     * 
     * @param id 章节/讨论关联主键
     * @return 章节/讨论关联
     */
    @Override
    public NbChapterDiscuss selectNbChapterDiscussById(Long id)
    {
        return nbChapterDiscussMapper.selectNbChapterDiscussById(id);
    }

    /**
     * 查询章节/讨论关联列表
     * 
     * @param nbChapterDiscuss 章节/讨论关联
     * @return 章节/讨论关联
     */
    @Override
    public List<NbChapterDiscuss> selectNbChapterDiscussList(NbChapterDiscuss nbChapterDiscuss)
    {
        return nbChapterDiscussMapper.selectNbChapterDiscussList(nbChapterDiscuss);
    }

    /**
     * 新增章节/讨论关联
     * 
     * @param nbChapterDiscuss 章节/讨论关联
     * @return 结果
     */
    @Override
    public int insertNbChapterDiscuss(NbChapterDiscuss nbChapterDiscuss)
    {
        return nbChapterDiscussMapper.insertNbChapterDiscuss(nbChapterDiscuss);
    }

    /**
     * 修改章节/讨论关联
     * 
     * @param nbChapterDiscuss 章节/讨论关联
     * @return 结果
     */
    @Override
    public int updateNbChapterDiscuss(NbChapterDiscuss nbChapterDiscuss)
    {
        return nbChapterDiscussMapper.updateNbChapterDiscuss(nbChapterDiscuss);
    }

    /**
     * 批量删除章节/讨论关联
     * 
     * @param ids 需要删除的章节/讨论关联主键
     * @return 结果
     */
    @Override
    public int deleteNbChapterDiscussByIds(Long[] ids)
    {
        return nbChapterDiscussMapper.deleteNbChapterDiscussByIds(ids);
    }

    /**
     * 删除章节/讨论关联信息
     * 
     * @param id 章节/讨论关联主键
     * @return 结果
     */
    @Override
    public int deleteNbChapterDiscussById(Long id)
    {
        return nbChapterDiscussMapper.deleteNbChapterDiscussById(id);
    }
}
